package com.player.thirdGroup.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.util.Date;

/**
 * @author VULCAN
 * @create 2019-12-27 21:05
 * @desc 运动员表
 **/
@Entity
@Table(name = "sys_player")
public class Player {

    @Id
    @Column(name = "player_id")
    private String id;
    @Column(name = "player_name")
    private String name;
    @Column(name = "player_sex")
    private String sex;
    @Column(name = "player_age")
    private int age;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @Column(name = "player_birthday")
    private Date birthday;
    @Column(name = "player_height")
    private String height;
    @Column(name = "player_weight")
    private String weight;
    @Column(name = "player_id_number")
    private String number;
    @Column(name = "player_student_num")
    private String student;
    @Column(name = "player_hand")
    private String hand;
    @Column(name = "player_location")
    private String location;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @Column(name = "player_year1")
    private Date year1;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @Column(name = "player_year2")
    private Date year2;
    @Column(name = "player_frout")
    private String frout;
    @Column(name = "player_side")
    private String side;
    @Column(name = "player_book")
    private String book;
//    @Column(name = "dept_id")
//    private String did;
    @ManyToOne
    @JoinColumn(name="dept_id")
    private Dept  dept;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @Column(name = "player_cdate")
    private Date cdate;
    @Column(name = "player_img")
    private String img;
    @Column(name = "player_status")
    private String status;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getHeight() {
        return height;
    }

    public void setHeight(String height) {
        this.height = height;
    }

    public String getWeight() {
        return weight;
    }

    public void setWeight(String weight) {
        this.weight = weight;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getStudent() {
        return student;
    }

    public void setStudent(String student) {
        this.student = student;
    }

    public String getHand() {
        return hand;
    }

    public void setHand(String hand) {
        this.hand = hand;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public Date getYear1() {
        return year1;
    }

    public void setYear1(Date year1) {
        this.year1 = year1;
    }

    public Date getYear2() {
        return year2;
    }

    public void setYear2(Date year2) {
        this.year2 = year2;
    }

    public String getFrout() {
        return frout;
    }

    public void setFrout(String frout) {
        this.frout = frout;
    }

    public String getSide() {
        return side;
    }

    public void setSide(String side) {
        this.side = side;
    }

    public String getBook() {
        return book;
    }

    public void setBook(String book) {
        this.book = book;
    }

    public Dept getDept() {
        return dept;
    }

    public void setDept(Dept dept) {
        this.dept = dept;
    }

    public Date getCdate() {
        return cdate;
    }

    public void setCdate(Date cdate) {
        this.cdate = cdate;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "Player{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                ", birthday=" + birthday +
                ", height='" + height + '\'' +
                ", weight='" + weight + '\'' +
                ", number='" + number + '\'' +
                ", student='" + student + '\'' +
                ", hand='" + hand + '\'' +
                ", location='" + location + '\'' +
                ", year1=" + year1 +
                ", year2=" + year2 +
                ", frout='" + frout + '\'' +
                ", side='" + side + '\'' +
                ", book='" + book + '\'' +
                ", dept=" + dept +
                ", cdate=" + cdate +
                ", img='" + img + '\'' +
                ", status='" + status + '\'' +
                '}';
    }
}
